home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 April / Chip CMCD0400.iso / SOFTWARE / Demo / InfoPulse / GateKeeper / gk3full.exe / data1.cab / ConfigSite_Files / proxies / editproxy.agp < prev    next >
Encoding:
Text File  |  1999-06-17  |  4.1 KB  |  158 lines

  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  4. <meta NAME="Author,Design" Content="GateKeeper Team; gatekeeper@infopulse.net">
  5. <meta NAME="Copyright" Content="Infopulse; www.infopulse.net">
  6. <title>Empty</title>
  7. </head>
  8.  
  9. <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080">
  10. <%
  11.     action = Request.ReqParam("action")
  12.     order = Request.ReqParam("ProxyNo")
  13.     Set proxy = Proxies.item( order )
  14.     
  15.     if action = "Commit" Then
  16.         ' Process the new settings
  17.  
  18.         strProps = proxy.GetPropertyNames
  19.         tmpProps = strProps
  20.         While Len(tmpProps)
  21.  
  22.             pos = InStr(tmpProps,",")
  23.             If pos > 0 Then
  24.                 propName = Left(tmpProps,pos - 1)
  25.                 tmpProps = Mid(tmpProps,pos + 1)
  26.             Else
  27.                 propName = tmpProps
  28.                 tmpProps = ""
  29.             End If
  30.  
  31.             propType = proxy.GetPropertyType(propName)
  32.             if propType = "BOOL" Then
  33.                 propVal = Request.ReqParam(propName)
  34.                 if propVal <> "" then
  35.                     proxy.SetBoolProperty propName,True
  36.                 else
  37.                     proxy.SetBoolProperty propName,False
  38.                 end if
  39.             End if
  40.             if propType = "NUMBER" Then
  41.                 propVal = Request.ReqParam(propName)
  42.                 If Len(propVal) = 0 Then
  43.                     propVal = 0
  44.                 End If
  45.                 proxy.SetNumberProperty propName,propVal
  46.             End If
  47.             if propType = "STRING" Then
  48.                 propVal = Request.ReqParam(propName)
  49.                 proxy.SetStringProperty propName,propVal
  50.             End If
  51.             if propType = "PASSWORD" Then
  52.                 propVal = Request.ReqParam(propName)
  53.                 proxy.SetStringProperty propName,propVal
  54.             End If
  55.  
  56.         Wend
  57.  
  58.         On Error Resume Next
  59.         proxy.Commit
  60.         
  61.         If Not Err.Number = 0 Then 
  62.             ErrLine = Err.Description
  63.         else
  64.             Response.Redirect("curentproxies.agp")
  65.         End If
  66.     Else
  67.         if( action = "Delete" ) then
  68.             proxy.Remove
  69.             Response.Redirect("curentproxies.agp")
  70.         End if
  71.     End If
  72. %>
  73. <p><big><strong><font face="Arial">Edit proxy</font></strong></big></p>
  74. <%
  75.     If Not Len(ErrLine) = 0 Then
  76.         Response.Write("<B><FONT COLOR=""#FF0000"">" & ErrLine & "</FONT></B><br>")
  77.     End If
  78. %>
  79. <form method="POST" action= "/proxies/editproxy.agp">
  80.     <input type="hidden" name="ProxyNo" value="<%Response.Write( order )%>" >
  81.     <div align="center"><center>
  82.     <table border="1" cellpadding="0" cellspacing="0" width="100%">
  83.     <tr>
  84.         <td width="50%" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  85.             Option
  86.         </font></strong></td>
  87.         <td width="50%" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  88.             Value
  89.         </font></strong></td>
  90.     </tr>
  91.     <%
  92.         On Error Resume Next
  93.         strProps = proxy.GetPropertyNames
  94.         tmpProps = strProps
  95.         While Len(tmpProps)
  96.             pos = InStr(tmpProps,",")
  97.             If pos > 0 Then
  98.                 propName = Left(tmpProps,pos - 1)
  99.                 tmpProps = Mid(tmpProps,pos + 1)
  100.             Else
  101.                 propName = tmpProps
  102.                 tmpProps = ""
  103.             End If
  104.     %>
  105.     <tr>
  106.         <td><strong><font face="Arial">
  107.             <%Response.Write(propName)%>
  108.         </font></strong></td>
  109.        <td>
  110.             <%
  111.                 propType = proxy.GetPropertyType(propName)
  112.                 if propType = "BOOL" Then
  113.                     if proxy.GetBoolProperty(propName) Then
  114.             %>
  115.                         <input type="checkbox" name="<%Response.Write(propName)%>" checked >
  116.             <%
  117.                     Else
  118.             %>
  119.                         <input type="checkbox" name="<%Response.Write(propName)%>">
  120.             <%
  121.                     End if
  122.                 End if
  123.                 if propType = "NUMBER" Then
  124.                     propVal = proxy.GetNumberProperty(propName)
  125.             %>
  126.                     <input type="text" size="5" maxlength="5" name="<%Response.Write(propName)%>" value="<%Response.Write(propVal)%>">
  127.             <%
  128.                 End If
  129.                 if propType = "STRING" Then
  130.                     propVal = proxy.GetStringProperty(propName)
  131.             %>
  132.                     <input type="text" size="30" name="<%Response.Write(propName)%>" value="<%Response.Write(propVal)%>">
  133.             <%
  134.                 End If
  135.                 if propType = "PASSWORD" Then
  136.                     propVal = proxy.GetStringProperty(propName)
  137.             %>
  138.                     <input type="password" size="30" name="<%Response.Write(propName)%>" value="<%Response.Write(propVal)%>">
  139.             <%
  140.                 End If
  141.             %>
  142.  
  143.        </td>        
  144.     </tr>
  145.     <%
  146.         Wend
  147.     %>
  148.     </td>
  149.     </table>
  150.     </center></div>
  151.     <p><input type="submit" name="action" value="Commit"></p>
  152. </form>
  153.  
  154. <font size="1" face="Arial"><%Response.Write(GateKeeper.Version)%></font>
  155.  
  156. </body>
  157. </html>
  158.